package net.wanho.shop.util;


/**
 * 管理当前登录用户的信息
 */
public class CurrentUtil {

    private static final ThreadLocal<Integer> localId = new ThreadLocal<>();

    public static void setId(Integer id) {
        localId.set(id);
    }

    public static Integer getId() {
        return localId.get();
    }

    public static void removeId() {
        localId.remove();
    }

}